<?php
/**
 * Created by PhpStorm.
 * User: 技术员专用
 * Date: 2019/3/21
 * Time: 17:02
 */

namespace app\admin\controller;


use app\common\lib\redis\Predis;

class Live
{
    public function push(){
        $data=[
            'type'=>request()->param('type'),
            'team'=>request()->param('team'),
            'content'=>request()->param('content'),
        ];
        $taskData = [
            'method'=>'pushLive',
            'data'=>$data,
        ];
        $_SERVER['http_server']->task($taskData);
//        $client=Predis::getInstance()->smember('live_key');
//        foreach ($client as $fd){
//            $_SERVER['http_server']->push($fd,json_encode($data));
//        }

    }
}